package com.studyroom.service;

import com.studyroom.dto.LoginFormDTO;
import com.studyroom.dto.PwdForm;
import com.studyroom.dto.Result;
import com.studyroom.dto.UserDTO;
import com.studyroom.entity.Icon;
import com.studyroom.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 
 * @since 2022-11-21
 */
public interface UserService extends IService<User> {

    Result login(LoginFormDTO loginFormDTO);
    User login(String principal);
    Result loginSuccess();
    Result register(UserDTO user);

    Result logout(HttpServletRequest req);

    Result me();

    User getById(Long id);

    Result updatePwd(PwdForm pwdForm);

    Result getIcons();

    Result updateIcon(Icon icon);

    Result getRegisterVerifyCode(String phone);

    Result loginByVerifyCode(UserDTO userDTO);

    Result getLoginVerifyCode(String phone);

    Result getOneById(Long id);
}
